#include "GWindow.h"
#include "GMessageHandler.h"
#include "GMessageManager.h"

namespace GEngine
{
	// Initialize messages so they are unique(almost)
	const GUInt32 GMessageHandler::G_MSG_VAL_HANDLER_ENABLED	= GMessageManager::RegisterMessage("G_MSG_HANDLER_ENABLED");
	const GUInt32 GMessageHandler::G_MSG_VAL_HANDLER_DISABLED	= GMessageManager::RegisterMessage("G_MSG_HANDLER_DISABLED");

	GMessageHandler::GMessageHandler()
	{
		Window = NULL;
	}

	GMessageHandler::~GMessageHandler()
	{
	}

	bool GMessageHandler::IsGlobal() const
	{
		return Window == NULL;
	}

	void GMessageHandler::SetTargetWindow(GWindow* TargetWindow)
	{
		Window = TargetWindow;
	}

	GWindow* GMessageHandler::GetTargetWindow() const
	{
		return Window;
	}
}